<?php require_once 'header.php' ?>				
		<div class="container theme-showcase" role="main">
			 <div class="page-header">
				<h1>Sản phẩm</h1>
			  </div>
			  <p>				
				<button type="button" class="btn btn-lg btn-primary" onClick="exportPage()">Xuất XLS</button>
				<button type="button" class="btn btn-lg btn-info" onClick="exportHTMLPage()">Xuất HTML</button>
				<button type="button" class="btn btn-lg btn-success" onClick="importXSL()">Import dữ liệu</button>				
			  </p>
			  			  
			  <?php 
				// generate products with size | quantity	
				$html_data = generateProductsArray2($con);
				// remove first element in product array
				array_splice($html_data,0,1);											
			  ?>
			  <div class="table-reponsive">
				<table class="table">
					<thead>
						<tr class="success">							
							<th>Title</th>
							<th>Code</th>
							<th>Color</th>							
							<th>xs_code</th>
							<th>xs</th>
							<th>s_code</th>
							<th>s</th>
							<th>m_code</th>
							<th>m</th>
							<th>l_code</th>
							<th>l</th>
							<th>xl_code</th>
							<th>xl</th>
							<th>xxl_code</th>
							<th>xxl</th>
							<th>xxxl_code</th>
							<th>xxxl</th>							
							<th>active</th>
							<th>created_at</th>							
						</tr>
					</thead>
					<tbody>
					<?php
						foreach($html_data as $data):
					?>
						 <tr>
							<td><?=$data[0] ?></td>
							<td><?=$data[1] ?></td>
							<td><?=$data[2] ?></td>
							<td><?=$data[7] ?></td>
							<td><?=$data[8] ?></td>
							<td><?=$data[11] ?></td>
							<td><?=$data[12] ?></td>
							<td><?=$data[13] ?></td>
							<td><?=$data[14] ?></td>
							<td><?=$data[15] ?></td>							
							<td><?=$data[16] ?></td>							
							<td><?=$data[9] ?></td>							
							<td><?=$data[10] ?></td>							
							<td><?=$data[5] ?></td>							
							<td><?=$data[6] ?></td>							
							<td><?=$data[3] ?></td>							
							<td><?=$data[4] ?></td>	
							<td><?=$data[17] ?></td>							
							<td><?=$data[18] ?></td>	
						</tr>
					<?php
						endforeach;
					?>
					</tbody>
				</table>
			  </div>
		</div>
	</body>
</html>